<?php

class Model_Orcldb {
	
	private  $_id = null;
    private  $_name = null;
    private  $_password = null;
    
   public function __construct() {
        
    }
           
  /*           
   public static function getUsers() {
    	$table = new Model_DbTable_Orcldb();
        $select = $table->select();
        $select->order('id');
        
        $rows = $table->fetchAll($select);
        return $rows;
    }
   */
   public static function getAll() {
   	
   	$db=Zend_Db_Table::getDefaultAdapter();
 		$sql="SELECT * FROM BILL";
		$rs=$db->query($sql);
		$rows=$rs->fetchAll();
		return $rows;
   	
   }
    
/**	public static function getUser($id) {
    	
 		$table = new Model_DbTable_User();
    	$rows = $table->find($id);
        if ( $row = $rows->current() ) {
        	
        $user=new self($row->id);
        $user->setExtraByDbRow($row);
        return $user;
    	}
    }
*/
  /**
 	public static function addUser($id,$login,$password) {
    	
 		$table = new Model_DbTable_User();
    	$select=$table->select();
    	$select->where('name = ?', $login);
    	$select->order('id');
      	if ($row = $table->fetchRow($select)) {
        	throw new Exception('It is a duplicated ID or email: '.$id);
        }
        $data=array(
        'id'=>null,
        'name'=>$login,
        'password'=>$password              
        );
        if (!$id=$table->insert($data)) {
        	throw new Exception('Failed to insert record!');        		
                
        } 
       
   	}
    */ 	       
} 
